1. Field of the Invention
The present invention relates generally to the data processing field, and more particularly, to a system, computer implemented method and computer program product for dynamically updating a Web page using browser-based messaging.
2. Description of the Related Art
The Web has created an incredible growth environment by making business applications easy to deploy, manage and access. As a result, the Web has replaced the client-server model fairly quickly. Based on open standards such as Java™, J2EE™ (Java™ 2 Platform Enterprise Edition), HTTP (Hyper Text Transfer Protocol), HTML (Hyper Text Markup Language) and JavaScript™, and the ubiquitous browser; enterprises are able to open up their “backends” and create an environment where employees and customers can readily access a variety of applications from any location at any time.
On the other hand, however, the Web has created a user experience that is considered to be a step backward from what existed in the client-server world. There, clients enjoyed arbitrary richness as provided by the hosting GUI (Graphical User Interface)-based operating system such as Microsoft® Windows®. Although Web interfaces can be made very graphical, the actual interactivity model is very restrictive. The perceptible performance gap and full screen refreshes between most interactions with the user, for instance, remain an important issue. ActiveX™ controls and the like attempt to remedy this in various ways but have failed to gain ubiquitous usage because of issues relating to the development model, security, performance and compatibility. Only Web pages with HTML, DHTML (Dynamic HTML), CSS (Cascading Style Sheets) and JavaScript™ have remained ubiquitous and widely used. Java™ applets to some extent can perform many tasks on browsers despite the difficulty of accommodating the variety of browsers with different JVMs (Java™ Virtual Machines) in use on the Internet as well as security restrictions.
The On-Demand Client Browser Framework (OBF) is a software framework which implements browser-based Service Data Objects (SDO), a Java™ standard model using JavaScript™, and includes a set of JavaScript™ UI widgets as well as a small server-side Java™ library for streaming data. The OBF tries to address many of the interactivity issues raised by the Web, but remains rooted in the traditional Web page architecture.
Based on an advanced usage of JavaScript in modern browsers such as IE 5.5 and above, Netscape® 6 and above, and Mozilla™ 1.x, the OBF seeks to create “Web pages that last longer”. Composed with a dynamic model that packs more data, OBF enabled Web pages are able to sustain longer interactions with an end user without requiring roundtrips back to the server. By creating what effectively is an MVC (Model View Controller) model inside the page, a developer is able to define a working data set and a set of controls that dynamically bind to that data. Thus, the same data object can be shared among different widgets on the same page.
Consider, for example, a Web application for managing a user's stock portfolio. In this example, stock prices as well as asset allocation (percentage of the value of a particular stock in the total portfolio, i.e., price*shares/total value) needs to be displayed for users. A scrollable table display of data (sometimes referred to as a DataGrid) can be used to display asset allocation (stock issue, volume) for example, and the current price for a particular stock; and a pie chart can also be used to display the same information to a user. This data can be shared by the DataGrid and the pie chart at the same time. When any data object in the model is updated, the binding component in the OBF will notify the user interface objects, which are bound to the data object, to refresh themselves to reflect the latest changes. The user can then interact with the working data set, using the set of controls, and until a roundtrip back to the server is really necessary (e.g., to submit data, complete a transaction, etc.), the user benefits from response times and a freedom to interact with the page that is uncommon in regular Web pages.
While the OBF is able to cache a certain amount of data inside its data model on the Web page at the time of initial page loading, and can greatly improve the usability (interactivity and responsiveness) of Web pages, the data set that can be cached is still limited due to client computer memory constraints and incurred initial network delay from downloading a large data set. In addition, OBF-enabled Web pages lack an intrinsic facility for keeping the Data Objects current while they are on the user's screen. The above-described Web application of a stock portfolio is a good example of this. In this case, stock prices are changing with time and the Web pages have to be updated to keep up with the changes. In a standard Web application, data on a Web page can only be updated if the entire page is re-retrieved from the server. This is inefficient in that it requires a round trip of a request-response pair for each data refresh, and also loses any updates the user may have made on a different part of the same page.
In the OBF, one way of updating data in the model is made possible by using a browser-based WebService control. However, a user has to initiate a WebService call to update a data page by clicking a button or hyperlink on a Web page. It essentially is a pull-based model which requires user actively seeking the data and refreshing the Web page often.
A competitor of the OBF is AJAX. AJAX stands for Asynchronous JavaScript™ and XML (Extensible Markup Language), a term describing a Web development approach to creating interactive Web applications using a combination of technologies:                HTML, or XHTML (Extensible HTML), and CSS for information presentation        The Document Object Model manipulated through JavaScript™ to dynamically display and interact with the information presented        The XMLHttpRequest object to retrieve data asynchronously from the Web server on the background.        
The technologies used by AJAX have been available since 1997, however, several recent high-profile offerings from Google™ are AJAX applications, including Gmail™, Google™ Maps, Google™ Groups, etc. This has helped raise the profile of the technique and has made AJAX more popular among Internet developers.
Related to AJAX, a known solution of browser-based messaging is provided by ActiveMQ™ through its REST API (Application Program Interface). ActiveMQ™ is an open source JMS 1.1 provider and messaging middleware. AJAX support in ActiveMQ™ builds on top of the REST connector for ActiveMQ™, which allows Web capable devices to send or receive messages over JMS (Java™ Message Service).
Although OBF and AJAX share the same goals towards improving the usability of Web applications and use many of the same technologies (such as JavaScript™, HTML DOM (Document Object Model), CSS, etc.), there are considerable differences between them. OBF is well-architected using an MVC model on Web pages, as described above, with the model bound to widgets, thus allowing data sharing among widgets. By doing so, there is a clean separation between the data model and widgets. Any data update from the Web server is always made against the model. The model can be bound to any widget. With tooling help, Web page development using OBF can be made very flexible and easy to drag and drop. In contrast, there is no formal MVC model in AJAX, which uses XML as its data storage. The Web messaging of ActiveMQ™ uses XmlHttpRequest to make calls on the REST API to send and receive messages, and then an AJAX JavaScript™ library will manipulate the messages for presentation without involving a data model.
There is, accordingly, a need for a system and computer implemented method for dynamically updating a Web page using browser-based messaging to improve the usability and interactivity of Web applications.